
	<div id="sidbar_left">
			
		<div class="search_shop">

	    <form method="GET" action="<?php echo edp_href_link(PAGENAME_SHOP_SEARCH_RESULT);?>" id="filterform" name="filterform" >
	    <!--<input type="hidden" name="page" value="shop_search_result" />-->
		<input type="hidden" id="cate_id_list" value="<?php echoPageVar( $pageVars, 'cate_id_list' ); ?>" />
		<input type="hidden" id="sortby" name="sortby" value="<?php echoPageVar( $pageVars, 'sortby' ); ?>" />
		<input type="hidden" id="location" name="location" value="<?php echoPageVar( $pageVars, 'location' ); ?>" />
		<input type="hidden" id="plat_id" name="platid" value="<?php echoPageVar( $pageVars, 'plat_id' ); ?>" />
		<input type="hidden" id="paymethod_list" value="<?php echoPageVar( $pageVars, 'paymethod' ); ?>" />
		<input type="hidden" id="feature_list" value="<?php echoPageVar( $pageVars, 'feature' ); ?>" />
	
			<div class="search_shop01"><span>我要找店评</span></div>
			<div class="search_shop02">
				<table border="0" cellspacing="0" cellpadding="0" class="search_table1">
					<tr>
                        <td width="55px">关键字</td>
                        <td>
							<input type="text" name="q" value="<?php echoPageVar( $pageVars, 'keyword' ); ?>"  class="input_5" />
						</td>
					</tr>
					<tr>
                        <td colspan="2">网店分类：</td>
					</tr>
					<tr>
                        <td colspan="2">
							 <select id="selcategory" name="category" class="filter_3" style="width: 180px;">
								<option value="" selected>所有类目</option>
								<?php
					foreach( $pageVars['shopcatelist'] as $key=>$value ) {
						echo "<option value=\"$value\">$key</option>\n";
					}
				?>
							</select>
                        </td>
					</tr>
					<tr>
                        <td colspan="2">付款方式：</td>
					</tr>
					<tr>
                        <td colspan="2">
							<table border="0" cellspacing="0" cellpadding="0" class="search_table2">
								<tr>
									<td>
										<input type="checkbox" id="paymethod1" name="paymethod[]" value="1"/>
										<label for="paymethod1">支付平台</label>
									</td>
									<td>
										<input type="checkbox" id="paymethod2" name="paymethod[]" value="2"/>
										<label for="paymethod2">网银支付</label>
									</td>
								</tr>
								<tr>
									<td>
										<input type="checkbox" id="paymethod3" name="paymethod[]" value="3"/>
										<label for="paymethod3">信用卡</label>
									</td>
									<td>
										<input type="checkbox" id="paymethod4" name="paymethod[]" value="4"/>
										<label for="paymethod4">货到付款</label>
									</td>
								</tr>
								<tr>
									<td>
										<input type="checkbox" id="paymethod5" name="paymethod[]" value="5"/>
										<label for="paymethod5">汇款</label>
									</td>
									<td>&nbsp;</td>
								</tr>
                            </table>                        </td>
					</tr>
					<tr>
                        <td colspan="2">特色：</td>
					</tr>
					<tr>
                        <td colspan="2">
							<table  border="0" cellpadding="0" cellspacing="0" class="search_table2">
								<tr>
									<td>
										<input type="checkbox" id="feature1" name="feature[]" value="1"/>
										<label for="feature1">7天退换</label>
									</td>
									<td>
										<input type="checkbox" id="feature2" name="feature[]" value="2"/>
										<label for="feature2">30天保修</label>
									</td>
								</tr>
								<tr>
									<td>
										<input type="checkbox" id="feature3" name="feature[]" value="3"/>
										<label for="feature3">假一赔三</label>
									</td>
									<td>
										<input type="checkbox" id="feature4" name="feature[]" value="4"/>
										<label for="feature4">免邮</label>
									</td>
								</tr>
								<tr>
									<td>
										<input type="checkbox" id="feature5" name="feature[]" value="5"/>
										<label for="feature5">如实描述</label>
									</td>
									<td>
										<input type="checkbox" id="feature6" name="feature[]" value="6"/>
										<label for="feature6">送礼品</label>
									</td>
								</tr>
								<tr>
									<td>
										<input type="checkbox" id="feature7" name="feature[]" value="7"/>
										<label for="feature7">代购</label>
									</td>
									<td>
										<input type="checkbox" id="feature8" name="feature[]" value="8"/>
										<label for="feature8">海外商品</label>
									</td>
								</tr>
								<tr>
									<td>
										<input type="checkbox" id="feature9" name="feature[]" value="9"/>
										<label for="feature9">积分</label>
									</td>
									<td>
										<input type="checkbox" id="feature10" name="feature[]" value="10"/>
										<label for="feature10">发票</label>
									</td>
								</tr>
							</table></td>
					</tr>
					<tr>
                        <td colspan="2" align="center">
							<input type="submit" value="确定" class="btn_1"/>
						</td>
					</tr>
				</table>
			</div>
			<div class="search_shop03"></div>
				</form> 
		</div>


		<div class="cate_shop">
			<div class="cate_shop01"><span>店铺分类</span></div>
			<div id="allcatelist" class="cate_shop02">
<?php
				 $count=1;
				 foreach($cateMapping as $key=>$cateList)
				 {
?>
					<ul id="<?php echo "cate_".$count."_ul";?>" class="cate_shop_ul">
						<span id="<?php echo "cate_".$count;?>"><?php echo $key;?></span>
			
<?php
						foreach($cateList as $key=>$category)
						{
?>
							<li><a href="<?php echo edp_href_link(PAGENAME_SHOP_SEARCH_RESULT, 'category='.$key.'&q=');?>" id="<?php echo $key; ?>"><?php echo $category;?></a></li>
<?php
						}
?>
					

					</ul>
<?php
					$count++;
				 } 
?>
			</div>
		
		</div>

	</div>

	<div id="mainContent_2">
	<?php
	if( isset( $pageVars['dbRes'] ) && count($pageVars['dbRes']) > 0 ) {
		$resultCount = $pageVars['result']['total']==1000?"1000+":$pageVars['result']['total'];
	?>
		<div id="searchhint">
			<p class="searchhint_t">
				<?php
				if(!edp_is_empty_string($pageVars['cate_id_list']))
				{
					echo '在当前分类下';
				} 
				?>	
				共找到
				<?php
				if(!edp_is_empty_string($pageVars['keyword'])) 
				{
				?>
				&nbsp;<span class="hilight">"<?php echoPageVar($pageVars, 'keyword');?>"</span>
				&nbsp;相关商铺&nbsp;
				<?php
				}
				?>
				<span class="hilightNo"><?php echo $resultCount;?></span>&nbsp;家, 用时<?php echo $pageVars['result']['time'];?>秒：
			</p>
			<?php
		if( isset( $pageVars['dbGroupByRes'] ) && count( $pageVars['dbGroupByRes'] ) > 0 )
		{
	  ?>
				<ul id="searchhint_category_less" class="searchhint_c">
				<?php
			$n = 0;
			foreach( $pageVars['dbGroupByRes'] as $item ){
				echo "<li><a href=\"javascript:ProductCatFilter(".$item['id'].")\">".$item['cate_name']."(".$item['count'].")</a></li>";
				$n++;
				//only display three here
				if( $n == 3 ){
					break;
				}
			}
		?>
				<li class="alllist"><a id="showAllCategory" href="#">显示全部类目</a></li>
				</ul>
				<ul id="searchhint_category_all" class="searchhint_c" style="display:none">
				<?php
			foreach( $pageVars['dbGroupByRes'] as $item ){
				echo "<li><a href=\"javascript:ProductCatFilter(".$item['id'].")\">".$item['cate_name']."(".$item['count'].")</a></li>";
			}
		?>
				<li class="alllist"><a id="showLessCategory" href="#">显示精简类目</a></li>
				</ul>
				<?php
		}
		?>
		</div>
		<?php
	}
	?>

		<div id="search_filter_toolbar">
			<ul class="filter_tab">
				<li class="filter_shop" id="c2ctab"><h3>店铺</h3></li>
				<li class="filter_mall" id="b2ctab"><h3>商城</h3></li>
			</ul>
			<div id="filter_main">
				<div id="filter_main_m">
					<span>
                        排序：
						 <select id="selsortby" class="filter_1">
							<option value="">默认</option>
							<option value="review_count-desc">人气</option>
							<option value="score-desc">综合评分</option>
							<option value="rate-desc">性价比</option>
							<option value="service-desc">商家服务</option>
							<option value="velocity-desc">发货速度</option>
							<option value="reality-desc">商品真实度</option>
						</select>
						 <select id="sellocation" class="filter_1">
							<option value="" selected>所在地</option>
							<?php
				foreach( $pageVars['cityList'] as $key=>$value ) {
					echo "<option value=\"$value\">$key</option>\n";
				}
				?>
						</select>
			<?php if( !$pageVars[ "ismall" ] ){ ?>
                        过滤：
						<select id="selplatfilter" class="filter_1">
							<option value="">全部</option>
							<option value="1">淘宝</option>
							<option value="4">百度</option>
							<option value="3">拍拍</option>
							<option value="2">易趣</option>
						</select>
			<?php } ?>
					</span>
					<ul class="filter_title">
						<li id="sortservice"><span>商家服务</span></li>
						<li id="sortreality"><span>商品真实度</span></li>
						<li id="sortvelocity"><span>发货速度</span></li>
						<li id="sortrate"><span>性价比</span></li>
					</ul>
				</div>
			</div>
		</div>


		<table border="0" cellspacing="0" cellpadding="0" class="item_list">
			<?php
		if( isset( $pageVars['dbRes'] ) && count($pageVars['dbRes']) > 0 ) {
			foreach( $pageVars['dbRes'] as $item ) {
		?>
			<tr class="item">
				<td class="item_data">
				<a href="<?php echo edp_href_link( PAGENAME_SHOP_INFO, "sid=".$item['id']) ;?>">
				 
				 <?php if( !$pageVars[ "ismall" ] ){?>
					<img src=<?php echo $item['logo_url'];?> alt="<?php secho( $item['shop_name_plain'] ); ?>" class="item_list_pic_shop" />			 
				 <?php }else{ ?>
				 <span class="item_list_pic_mall">
					<img src=<?php echo $item['logo_url'];?> alt="<?php secho( $item['shop_name_plain'] ); ?>" class="" />			 
			     </span>
				 <?php } ?>
				</a>
                 
                    <p class="item_t"><a href="<?php echo edp_href_link( PAGENAME_SHOP_INFO, "sid=".$item['id']) ;?>"><?php echo $item['shop_name']; ?></a></p>
		<?php if( !$pageVars[ "ismall" ] ) { ?>
                    <p class="item_detail">来自：<a href="<?php echo edp_href_link(PAGENAME_PLATFORM, "platid=".$item['plat_id']);?>"><?php echo $item['plat_name'];?></a>&nbsp;&nbsp;
                        掌柜：<a href="#"><?php echo $item['nick'] ; ?></a> </p>
		<?php } ?>
		<?php if( !$pageVars[ "ismall" ] ) { ?>
                    <p class="item_detail">分类：<a href="javascript:ProductCatFilter(<?php echo $item['cate_id_list'];?>)"><?php echo $item['cate_name'];?></a>&nbsp;&nbsp;
		<?php }else{ ?>
                    <p class="item_detail">分类：
			<?php $cate_ids = explode( ",", $item['cate_id_list'] ); $count=0;foreach( $cate_ids as $cate_id) { ?>
			<a href="javascript:ProductCatFilter(<?php echo $cate_id;?>)"><?php echo $shopcategory->GetShopCategoryName($cate_id);?></a>&nbsp;&nbsp;
			<?php  if( $count==7){ ?>
				<span style="display:none" id="catespan_<?php echo $item['id']; ?>">
		<?php } $count ++;}
			 if( $count >= 7) { 
				echo "</span><span><a id=\"cate_".$item['id']."\" href=\"javascript:ShowHideCategory(".$item['id'].")\">显示更多</a></span>";
			}
		 } ?>

                <?php if( !$pageVars[ "ismall" ] ) { ?>
		        所在地：<a href="#"><?php echo $item['location_text'];?></a></p>
		<?php }else{ ?>
			</p>
		<?php } ?>
					<p class="item_detail">
				<?php
				if($item['tags']){
				?>
						标签：
						<?php
				$count = 0;
				foreach ($item['tags'] as $tag ) {?>
						<a href="<?php echo edp_href_link( PAGENAME_SHOP_SEARCH_RESULT, "q=&tag=".$item['tags_plain'][$count]); ?>"><?php echo( $tag ); ?></a>&nbsp;
						<?php
				$count++;
					}
				}?>
					</p>
				</td>
				<td class="item_rank_ol">
					<table border="0" cellpadding="0" cellspacing="0"  class="item_rank">
						<tr>
							<td class="item_point"><?php echo $item['service'];?></td>
							<td class="item_point"><?php echo $item['reality'];?></td>
							<td class="item_point"><?php echo $item['velocity'];?></td>
							<td class="item_point"><?php echo $item['rate'];?></td>
						</tr>
						<tr>
							<td colspan="4">
                                                            <div>
                                                                <center>
                                                                    <span class="score<?php echo getScoreClass($item['score']); ?>" title="<?php echo $item['score'];?>"></span>
                                                                </center>
                                                            </div>
                                                            <br /><a href="<?php echo edp_href_link( PAGENAME_SHOP_INFO, "sid=".$item['id']."#ar" );?>"><img src="<?php echo IMAGE_DIR; ?>btn_add_review2.jpg" /></a>
							</td>
						</tr>
					</table>
				</td>
			</tr>	
			<?php
			}
			
		?>
		</table>
		<?php echoPageVar($pageVars, 'pagebar') ?>
		<div style="clear:both"></div>
		<div class="search_add" >没有找到想要的网店，请<a href="http://www.huakaili.com/add_shop"><img src="<?php echo IMAGE_DIR; ?>btn_add_shop2.jpg" /></a></div>
		
		<?php	
		}
		else {
		?>
			<tr><td>
				<div class="search_add" >没有找到想要的网店，请<a href="http://www.huakaili.com/add_shop"><img src="<?php echo IMAGE_DIR; ?>btn_add_shop2.jpg" /></a></div>
			
				
			</td></tr>	</table>
		<?php
		}
		?>		
	
		</div>
